// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;

namespace SnapObjects.Data
{
    public interface IModelEmbedded : IEmbedded
    {
        /// <summary>
        ///     Gets the type of the model class which the property relies on to load and update data.
        /// </summary>
        Type ModelType { get; }

        /// <summary>
        ///     Gets or sets the query method to be used when loading data for the current property.
        /// </summary>
        QuerySelector QuerySelector { get; set; }

        /// <summary>
        ///     Sets the SQL expression parameter that corresponds to the query method of the QuerySelector property.
        /// </summary>
        string QueryExpression { get; set; }

        /// <summary>
        ///     Gets or sets whether to perform the insert operation for the current property 
        ///     (using definitions of the detail model) when the current model is inserting data.
        /// </summary>
        bool CascadeCreate { get; set; }

        /// <summary>
        ///     Gets or sets whether to perform the delete operation for the current property 
        ///     (using definitions of the detail model) when the current model is deleting data.
        /// </summary>
        bool CascadeDelete { get; }

        /// <summary>
        /// 
        /// </summary>
        bool IsQueryByKey { get; }
    }
}
